import { Component } from 'react'
import { View, Text } from '@tarojs/components'
import Taro from '@tarojs/taro'
import './index.less'

export default class Index extends Component {

  go2ParentPage = () => {
    Taro.redirectTo({
      url: '/pages/demo/parent/parent?id=18'
    })
  }

  go2QuestionDemo = () => {
    Taro.redirectTo({
      url: '/pages/question/home/index'
    })
  }

  render() {
    return (
      <View className='container'>
        <Text onClick={this.go2ParentPage.bind(this)}>语法和知识点</Text>
        <Text onClick={this.go2QuestionDemo.bind(this)}>问答Demo</Text>
      </View>
    )
  }

}
